<script setup lang="ts">
import instance from './utils/request';
import { onMounted } from 'vue';

onMounted(async () => {
  const res = await instance.request({
    url: '/home/index',
    method: 'get',
  });
  console.log('res -----> ', res);
});
</script>

<template>
  <router-view></router-view>
  <button><router-link to="/login">登录</router-link></button>
  <button><router-link to="/">首页</router-link></button>
</template>
<!--样式-->
<style lang="less" scoped>
// 必须导入 variables 和 mixins 才能使用
h1 {
  background-color: @warnColor;
  .hoverShadow();
}
</style>
